Lecture 1
Section 1#
- Some very cool notes
Section 2#
See awesome math below
Section 3#
info
The code block below is very important. It has highlighting, file name, and line highlighting!
/src/fastInvSqrt.c
float Q_rsqrt( float number ){ long i; float x2, y; const float threehalfs = 1.5F;
x2 = number * 0.5F; y = number; i = * ( long * ) &y; // evil floating point bit level hacking i = 0x5f3759df - ( i >> 1 ); // what the fuck? y = * ( float * ) &i; y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
return y;Imported Code Files#
quizDate.ts
const quizDate = (A: any[]) => { if (A.length == 1) return A[0]; else if (A.length == 2) if (A[0] == A[1]) return A[0]; else return false;
const mid = A.length / 2; const B = quizDate(A.slice(0, mid)); const C = quizDate(A.slice(-mid));
if (!B && C) return C; else if ((!C && B) || B == C) return B;
return false;};
console.log(quizDate([1, 3, 1, 3, 1, 1, 3, 1]));